3.380 \(\int x (a+b \log (c (d+e x)^n)) (f+g \log (c (d+e x)^n)) \, dx\)

Optimal. Leaf size=196 \[ -\frac{d^2 n \log (d+e x) \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )}{2 e^2}+\frac{d n (d+e x) \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )}{e^2}-\frac{n (d+e x)^2 \left (a g+2 b g \log \left (c (d+e x)^n\right )+b f\right )}{4 e^2}+\frac{1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )+\frac{b d^2 g n^2 \log ^2(d+e x)}{2 e^2}+\frac{b g n^2 (d+e x)^2}{4 e^2}-\frac{2 b d g n^2 x}{e} \]

[Out]

(-2*b*d*g*n^2*x)/e + (b*g*n^2*(d + e*x)^2)/(4*e^2) + (b*d^2*g*n^2*Log[d + e*x]^2)/(2*e^2) + (x^2*(a + b*Log[c*
(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]))/2 + (d*n*(d + e*x)*(b*f + a*g + 2*b*g*Log[c*(d + e*x)^n]))/e^2 - (n*
(d + e*x)^2*(b*f + a*g + 2*b*g*Log[c*(d + e*x)^n]))/(4*e^2) - (d^2*n*Log[d + e*x]*(b*f + a*g + 2*b*g*Log[c*(d
+ e*x)^n]))/(2*e^2)

________________________________________________________________________________________

Rubi [A]  time = 0.370905, antiderivative size = 206, normalized size of antiderivative = 1.05, number of steps used = 13, number of rules used = 7, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.233, Rules used = {2439, 2411, 43, 2334, 12, 14, 2301} \[ \frac{1}{4} g n \left (-\frac{2 d^2 \log (d+e x)}{e^2}+\frac{4 d (d+e x)}{e^2}-\frac{(d+e x)^2}{e^2}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )+\frac{1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )+\frac{1}{4} b n \left (-\frac{2 d^2 \log (d+e x)}{e^2}+\frac{4 d (d+e x)}{e^2}-\frac{(d+e x)^2}{e^2}\right ) \left (g \log \left (c (d+e x)^n\right )+f\right )+\frac{b d^2 g n^2 \log ^2(d+e x)}{2 e^2}+\frac{b g n^2 (d+e x)^2}{4 e^2}-\frac{2 b d g n^2 x}{e} \]

Antiderivative was successfully verified.

[In]

Int[x*(a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]),x]

[Out]

(-2*b*d*g*n^2*x)/e + (b*g*n^2*(d + e*x)^2)/(4*e^2) + (b*d^2*g*n^2*Log[d + e*x]^2)/(2*e^2) + (g*n*((4*d*(d + e*
x))/e^2 - (d + e*x)^2/e^2 - (2*d^2*Log[d + e*x])/e^2)*(a + b*Log[c*(d + e*x)^n]))/4 + (b*n*((4*d*(d + e*x))/e^
2 - (d + e*x)^2/e^2 - (2*d^2*Log[d + e*x])/e^2)*(f + g*Log[c*(d + e*x)^n]))/4 + (x^2*(a + b*Log[c*(d + e*x)^n]
)*(f + g*Log[c*(d + e*x)^n]))/2

Rule 2439

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + Log[(h_.)*((i_.) + (j_.)*(x_))^(m_.)]*
(g_.))*(x_)^(r_.), x_Symbol] :> Simp[(x^(r + 1)*(a + b*Log[c*(d + e*x)^n])^p*(f + g*Log[h*(i + j*x)^m]))/(r +
1), x] + (-Dist[(g*j*m)/(r + 1), Int[(x^(r + 1)*(a + b*Log[c*(d + e*x)^n])^p)/(i + j*x), x], x] - Dist[(b*e*n*
p)/(r + 1), Int[(x^(r + 1)*(a + b*Log[c*(d + e*x)^n])^(p - 1)*(f + g*Log[h*(i + j*x)^m]))/(d + e*x), x], x]) /
; FreeQ[{a, b, c, d, e, f, g, h, i, j, m, n}, x] && IGtQ[p, 0] && IntegerQ[r] && (EqQ[p, 1] || GtQ[r, 0]) && N
eQ[r, -1]

Rule 2411

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[((g*x)/e)^q*((e*h - d*i)/e + (i*x)/e)^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2334

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rubi steps

\begin{align*} \int x \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right ) \, dx &=\frac{1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )-\frac{1}{2} (b e n) \int \frac{x^2 \left (f+g \log \left (c (d+e x)^n\right )\right )}{d+e x} \, dx-\frac{1}{2} (e g n) \int \frac{x^2 \left (a+b \log \left (c (d+e x)^n\right )\right )}{d+e x} \, dx\\ &=\frac{1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )-\frac{1}{2} (b n) \operatorname{Subst}\left (\int \frac{\left (-\frac{d}{e}+\frac{x}{e}\right )^2 \left (f+g \log \left (c x^n\right )\right )}{x} \, dx,x,d+e x\right )-\frac{1}{2} (g n) \operatorname{Subst}\left (\int \frac{\left (-\frac{d}{e}+\frac{x}{e}\right )^2 \left (a+b \log \left (c x^n\right )\right )}{x} \, dx,x,d+e x\right )\\ &=\frac{1}{4} g n \left (\frac{4 d (d+e x)}{e^2}-\frac{(d+e x)^2}{e^2}-\frac{2 d^2 \log (d+e x)}{e^2}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )+\frac{1}{4} b n \left (\frac{4 d (d+e x)}{e^2}-\frac{(d+e x)^2}{e^2}-\frac{2 d^2 \log (d+e x)}{e^2}\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+\frac{1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+2 \left (\frac{1}{2} \left (b g n^2\right ) \operatorname{Subst}\left (\int \frac{x (-4 d+x)+2 d^2 \log (x)}{2 e^2 x} \, dx,x,d+e x\right )\right )\\ &=\frac{1}{4} g n \left (\frac{4 d (d+e x)}{e^2}-\frac{(d+e x)^2}{e^2}-\frac{2 d^2 \log (d+e x)}{e^2}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )+\frac{1}{4} b n \left (\frac{4 d (d+e x)}{e^2}-\frac{(d+e x)^2}{e^2}-\frac{2 d^2 \log (d+e x)}{e^2}\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+\frac{1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+2 \frac{\left (b g n^2\right ) \operatorname{Subst}\left (\int \frac{x (-4 d+x)+2 d^2 \log (x)}{x} \, dx,x,d+e x\right )}{4 e^2}\\ &=\frac{1}{4} g n \left (\frac{4 d (d+e x)}{e^2}-\frac{(d+e x)^2}{e^2}-\frac{2 d^2 \log (d+e x)}{e^2}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )+\frac{1}{4} b n \left (\frac{4 d (d+e x)}{e^2}-\frac{(d+e x)^2}{e^2}-\frac{2 d^2 \log (d+e x)}{e^2}\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+\frac{1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+2 \frac{\left (b g n^2\right ) \operatorname{Subst}\left (\int \left (-4 d+x+\frac{2 d^2 \log (x)}{x}\right ) \, dx,x,d+e x\right )}{4 e^2}\\ &=\frac{1}{4} g n \left (\frac{4 d (d+e x)}{e^2}-\frac{(d+e x)^2}{e^2}-\frac{2 d^2 \log (d+e x)}{e^2}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )+\frac{1}{4} b n \left (\frac{4 d (d+e x)}{e^2}-\frac{(d+e x)^2}{e^2}-\frac{2 d^2 \log (d+e x)}{e^2}\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+\frac{1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+2 \left (-\frac{b d g n^2 x}{e}+\frac{b g n^2 (d+e x)^2}{8 e^2}+\frac{\left (b d^2 g n^2\right ) \operatorname{Subst}\left (\int \frac{\log (x)}{x} \, dx,x,d+e x\right )}{2 e^2}\right )\\ &=2 \left (-\frac{b d g n^2 x}{e}+\frac{b g n^2 (d+e x)^2}{8 e^2}+\frac{b d^2 g n^2 \log ^2(d+e x)}{4 e^2}\right )+\frac{1}{4} g n \left (\frac{4 d (d+e x)}{e^2}-\frac{(d+e x)^2}{e^2}-\frac{2 d^2 \log (d+e x)}{e^2}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )+\frac{1}{4} b n \left (\frac{4 d (d+e x)}{e^2}-\frac{(d+e x)^2}{e^2}-\frac{2 d^2 \log (d+e x)}{e^2}\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )+\frac{1}{2} x^2 \left (a+b \log \left (c (d+e x)^n\right )\right ) \left (f+g \log \left (c (d+e x)^n\right )\right )\\ \end{align*}

Mathematica [A]  time = 0.0484104, size = 263, normalized size = 1.34 \[ \frac{1}{2} a g x^2 \log \left (c (d+e x)^n\right )-\frac{a d^2 g n \log (d+e x)}{2 e^2}+\frac{a d g n x}{2 e}+\frac{1}{2} a f x^2-\frac{1}{4} a g n x^2-\frac{b d^2 g \log ^2\left (c (d+e x)^n\right )}{2 e^2}+\frac{3 b d^2 g n \log \left (c (d+e x)^n\right )}{2 e^2}+\frac{1}{2} b f x^2 \log \left (c (d+e x)^n\right )+\frac{1}{2} b g x^2 \log ^2\left (c (d+e x)^n\right )-\frac{1}{2} b g n x^2 \log \left (c (d+e x)^n\right )+\frac{b d g n x \log \left (c (d+e x)^n\right )}{e}-\frac{b d^2 f n \log (d+e x)}{2 e^2}+\frac{b d f n x}{2 e}-\frac{3 b d g n^2 x}{2 e}-\frac{1}{4} b f n x^2+\frac{1}{4} b g n^2 x^2 \]

Antiderivative was successfully verified.

[In]

Integrate[x*(a + b*Log[c*(d + e*x)^n])*(f + g*Log[c*(d + e*x)^n]),x]

[Out]

(b*d*f*n*x)/(2*e) + (a*d*g*n*x)/(2*e) - (3*b*d*g*n^2*x)/(2*e) + (a*f*x^2)/2 - (b*f*n*x^2)/4 - (a*g*n*x^2)/4 +
(b*g*n^2*x^2)/4 - (b*d^2*f*n*Log[d + e*x])/(2*e^2) - (a*d^2*g*n*Log[d + e*x])/(2*e^2) + (3*b*d^2*g*n*Log[c*(d
+ e*x)^n])/(2*e^2) + (b*d*g*n*x*Log[c*(d + e*x)^n])/e + (b*f*x^2*Log[c*(d + e*x)^n])/2 + (a*g*x^2*Log[c*(d + e
*x)^n])/2 - (b*g*n*x^2*Log[c*(d + e*x)^n])/2 - (b*d^2*g*Log[c*(d + e*x)^n]^2)/(2*e^2) + (b*g*x^2*Log[c*(d + e*
x)^n]^2)/2

________________________________________________________________________________________

Maple [C]  time = 0.603, size = 1558, normalized size = 8. \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+b*ln(c*(e*x+d)^n))*(f+g*ln(c*(e*x+d)^n)),x)

[Out]

1/2*(-I*Pi*b*e^2*g*x^2*csgn(I*c)*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)+I*Pi*b*e^2*g*x^2*csgn(I*c)*csgn(I*c*(e*
x+d)^n)^2+I*Pi*b*e^2*g*x^2*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2-I*Pi*b*e^2*g*x^2*csgn(I*c*(e*x+d)^n)^3+2*ln
(c)*b*e^2*g*x^2-b*e^2*g*n*x^2+a*e^2*g*x^2-2*b*d^2*g*n*ln(e*x+d)+2*b*d*e*g*n*x+b*e^2*f*x^2)/e^2*ln((e*x+d)^n)+1
/4*x^2*b*g*n^2-1/4*x^2*n*a*g-1/4*x^2*n*b*f+1/2*a*f*x^2+1/2*ln(c)*b*f*x^2+1/2*ln(c)^2*b*g*x^2+1/2*ln(c)*a*g*x^2
+1/2*g*b*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csgn(I*(e*x+d)^
n)*csgn(I*c*(e*x+d)^n)-1/2*I/e*Pi*b*d*g*n*x*csgn(I*c*(e*x+d)^n)^3+1/2*b*d*f*n*x/e

________________________________________________________________________________________

Maxima [A]  time = 1.05734, size = 302, normalized size = 1.54 \begin{align*} \frac{1}{2} \, b g x^{2} \log \left ({\left (e x + d\right )}^{n} c\right )^{2} - \frac{1}{4} \, b e f n{\left (\frac{2 \, d^{2} \log \left (e x + d\right )}{e^{3}} + \frac{e x^{2} - 2 \, d x}{e^{2}}\right )} - \frac{1}{4} \, a e g n{\left (\frac{2 \, d^{2} \log \left (e x + d\right )}{e^{3}} + \frac{e x^{2} - 2 \, d x}{e^{2}}\right )} + \frac{1}{2} \, b f x^{2} \log \left ({\left (e x + d\right )}^{n} c\right ) + \frac{1}{2} \, a g x^{2} \log \left ({\left (e x + d\right )}^{n} c\right ) + \frac{1}{2} \, a f x^{2} - \frac{1}{4} \,{\left (2 \, e n{\left (\frac{2 \, d^{2} \log \left (e x + d\right )}{e^{3}} + \frac{e x^{2} - 2 \, d x}{e^{2}}\right )} \log \left ({\left (e x + d\right )}^{n} c\right ) - \frac{{\left (e^{2} x^{2} + 2 \, d^{2} \log \left (e x + d\right )^{2} - 6 \, d e x + 6 \, d^{2} \log \left (e x + d\right )\right )} n^{2}}{e^{2}}\right )} b g \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n)),x, algorithm="maxima")

[Out]

1/2*b*g*x^2*log((e*x + d)^n*c)^2 - 1/4*b*e*f*n*(2*d^2*log(e*x + d)/e^3 + (e*x^2 - 2*d*x)/e^2) - 1/4*a*e*g*n*(2
*d^2*log(e*x + d)/e^3 + (e*x^2 - 2*d*x)/e^2) + 1/2*b*f*x^2*log((e*x + d)^n*c) + 1/2*a*g*x^2*log((e*x + d)^n*c)
 + 1/2*a*f*x^2 - 1/4*(2*e*n*(2*d^2*log(e*x + d)/e^3 + (e*x^2 - 2*d*x)/e^2)*log((e*x + d)^n*c) - (e^2*x^2 + 2*d
^2*log(e*x + d)^2 - 6*d*e*x + 6*d^2*log(e*x + d))*n^2/e^2)*b*g

________________________________________________________________________________________

Fricas [A]  time = 2.16008, size = 554, normalized size = 2.83 \begin{align*} \frac{2 \, b e^{2} g x^{2} \log \left (c\right )^{2} +{\left (b e^{2} g n^{2} + 2 \, a e^{2} f -{\left (b e^{2} f + a e^{2} g\right )} n\right )} x^{2} + 2 \,{\left (b e^{2} g n^{2} x^{2} - b d^{2} g n^{2}\right )} \log \left (e x + d\right )^{2} - 2 \,{\left (3 \, b d e g n^{2} -{\left (b d e f + a d e g\right )} n\right )} x + 2 \,{\left (2 \, b d e g n^{2} x + 3 \, b d^{2} g n^{2} -{\left (b e^{2} g n^{2} -{\left (b e^{2} f + a e^{2} g\right )} n\right )} x^{2} -{\left (b d^{2} f + a d^{2} g\right )} n + 2 \,{\left (b e^{2} g n x^{2} - b d^{2} g n\right )} \log \left (c\right )\right )} \log \left (e x + d\right ) + 2 \,{\left (2 \, b d e g n x -{\left (b e^{2} g n - b e^{2} f - a e^{2} g\right )} x^{2}\right )} \log \left (c\right )}{4 \, e^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n)),x, algorithm="fricas")

[Out]

1/4*(2*b*e^2*g*x^2*log(c)^2 + (b*e^2*g*n^2 + 2*a*e^2*f - (b*e^2*f + a*e^2*g)*n)*x^2 + 2*(b*e^2*g*n^2*x^2 - b*d
^2*g*n^2)*log(e*x + d)^2 - 2*(3*b*d*e*g*n^2 - (b*d*e*f + a*d*e*g)*n)*x + 2*(2*b*d*e*g*n^2*x + 3*b*d^2*g*n^2 -
(b*e^2*g*n^2 - (b*e^2*f + a*e^2*g)*n)*x^2 - (b*d^2*f + a*d^2*g)*n + 2*(b*e^2*g*n*x^2 - b*d^2*g*n)*log(c))*log(
e*x + d) + 2*(2*b*d*e*g*n*x - (b*e^2*g*n - b*e^2*f - a*e^2*g)*x^2)*log(c))/e^2

________________________________________________________________________________________

Sympy [A]  time = 3.04438, size = 389, normalized size = 1.98 \begin{align*} \begin{cases} - \frac{a d^{2} g n \log{\left (d + e x \right )}}{2 e^{2}} + \frac{a d g n x}{2 e} + \frac{a f x^{2}}{2} + \frac{a g n x^{2} \log{\left (d + e x \right )}}{2} - \frac{a g n x^{2}}{4} + \frac{a g x^{2} \log{\left (c \right )}}{2} - \frac{b d^{2} f n \log{\left (d + e x \right )}}{2 e^{2}} - \frac{b d^{2} g n^{2} \log{\left (d + e x \right )}^{2}}{2 e^{2}} + \frac{3 b d^{2} g n^{2} \log{\left (d + e x \right )}}{2 e^{2}} - \frac{b d^{2} g n \log{\left (c \right )} \log{\left (d + e x \right )}}{e^{2}} + \frac{b d f n x}{2 e} + \frac{b d g n^{2} x \log{\left (d + e x \right )}}{e} - \frac{3 b d g n^{2} x}{2 e} + \frac{b d g n x \log{\left (c \right )}}{e} + \frac{b f n x^{2} \log{\left (d + e x \right )}}{2} - \frac{b f n x^{2}}{4} + \frac{b f x^{2} \log{\left (c \right )}}{2} + \frac{b g n^{2} x^{2} \log{\left (d + e x \right )}^{2}}{2} - \frac{b g n^{2} x^{2} \log{\left (d + e x \right )}}{2} + \frac{b g n^{2} x^{2}}{4} + b g n x^{2} \log{\left (c \right )} \log{\left (d + e x \right )} - \frac{b g n x^{2} \log{\left (c \right )}}{2} + \frac{b g x^{2} \log{\left (c \right )}^{2}}{2} & \text{for}\: e \neq 0 \\\frac{x^{2} \left (a + b \log{\left (c d^{n} \right )}\right ) \left (f + g \log{\left (c d^{n} \right )}\right )}{2} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*ln(c*(e*x+d)**n))*(f+g*ln(c*(e*x+d)**n)),x)

[Out]

Piecewise((-a*d**2*g*n*log(d + e*x)/(2*e**2) + a*d*g*n*x/(2*e) + a*f*x**2/2 + a*g*n*x**2*log(d + e*x)/2 - a*g*
n*x**2/4 + a*g*x**2*log(c)/2 - b*d**2*f*n*log(d + e*x)/(2*e**2) - b*d**2*g*n**2*log(d + e*x)**2/(2*e**2) + 3*b
*d**2*g*n**2*log(d + e*x)/(2*e**2) - b*d**2*g*n*log(c)*log(d + e*x)/e**2 + b*d*f*n*x/(2*e) + b*d*g*n**2*x*log(
d + e*x)/e - 3*b*d*g*n**2*x/(2*e) + b*d*g*n*x*log(c)/e + b*f*n*x**2*log(d + e*x)/2 - b*f*n*x**2/4 + b*f*x**2*l
og(c)/2 + b*g*n**2*x**2*log(d + e*x)**2/2 - b*g*n**2*x**2*log(d + e*x)/2 + b*g*n**2*x**2/4 + b*g*n*x**2*log(c)
*log(d + e*x) - b*g*n*x**2*log(c)/2 + b*g*x**2*log(c)**2/2, Ne(e, 0)), (x**2*(a + b*log(c*d**n))*(f + g*log(c*
d**n))/2, True))

________________________________________________________________________________________

Giac [B]  time = 1.36509, size = 644, normalized size = 3.29 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*log(c*(e*x+d)^n))*(f+g*log(c*(e*x+d)^n)),x, algorithm="giac")

[Out]

1/2*(x*e + d)^2*b*g*n^2*e^(-2)*log(x*e + d)^2 - (x*e + d)*b*d*g*n^2*e^(-2)*log(x*e + d)^2 - 1/2*(x*e + d)^2*b*
g*n^2*e^(-2)*log(x*e + d) + 2*(x*e + d)*b*d*g*n^2*e^(-2)*log(x*e + d) + (x*e + d)^2*b*g*n*e^(-2)*log(x*e + d)*
log(c) - 2*(x*e + d)*b*d*g*n*e^(-2)*log(x*e + d)*log(c) + 1/4*(x*e + d)^2*b*g*n^2*e^(-2) - 2*(x*e + d)*b*d*g*n
^2*e^(-2) + 1/2*(x*e + d)^2*b*f*n*e^(-2)*log(x*e + d) - (x*e + d)*b*d*f*n*e^(-2)*log(x*e + d) + 1/2*(x*e + d)^
2*a*g*n*e^(-2)*log(x*e + d) - (x*e + d)*a*d*g*n*e^(-2)*log(x*e + d) - 1/2*(x*e + d)^2*b*g*n*e^(-2)*log(c) + 2*
(x*e + d)*b*d*g*n*e^(-2)*log(c) + 1/2*(x*e + d)^2*b*g*e^(-2)*log(c)^2 - (x*e + d)*b*d*g*e^(-2)*log(c)^2 - 1/4*
(x*e + d)^2*b*f*n*e^(-2) + (x*e + d)*b*d*f*n*e^(-2) - 1/4*(x*e + d)^2*a*g*n*e^(-2) + (x*e + d)*a*d*g*n*e^(-2)
+ 1/2*(x*e + d)^2*b*f*e^(-2)*log(c) - (x*e + d)*b*d*f*e^(-2)*log(c) + 1/2*(x*e + d)^2*a*g*e^(-2)*log(c) - (x*e
 + d)*a*d*g*e^(-2)*log(c) + 1/2*(x*e + d)^2*a*f*e^(-2) - (x*e + d)*a*d*f*e^(-2)